<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

/**
 * MY_Controller Class
 *
 * Extends CI Controller
 *
 * @author 	Original by EllisLab - Extension by CleverIgniters
 * @see		http://codeigniter.com
 */
class MY_Controller extends CI_Controller {
	
	var $user;
	protected $_template;
    function __construct()
	{
		parent::__construct();
		$enable_profiler = $this->config->item('enable_profiler');
		$enable_cache = $this->config->item('enable_cache');
		$this->output->enable_profiler($enable_profiler);
		
		if($enable_cache)
		{
			$this->output->cache($this->config->item('cache_time'));
		}	
		// Get user object
		//$this->user = $this->access->get_user();
		
		//$this->load->helper('confirm');		
    }

} // End MY_Controller


// ------------------------------------------------------------------------


/**
 * MY_Admin Class
 *
 * Extends MY_Controller
 *
 * @author 	CleverIgniters
 */
class MY_Admin extends MY_Controller
{	
    function __admin()
    {
        parent::__controller();

		// Protect the admin area
		$this->access->restrict();
		
		// Default Admin Sidebar
		//$this->template->sidebar('member');
		
		// Don't want to cache this content
		$this->output->set_header("Cache-Control: no-store, no-cache, must-revalidate");
		$this->output->set_header("Cache-Control: post-check=0, pre-check=0", false);
		$this->output->set_header("Pragma: no-cache");
    }

} // End Admin class


/* End of file MY_Controller.php */
/* Location: ./application/libraries/MY_Controller.php */